<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableArts extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('arts', function (Blueprint $table) {
            $table->increments('art_id')->comment('文章主键');
            $table->char('art_title',30)->default('')->comment('文章标题');
            $table->char('art_img',100)->default('')->comment('文章缩略图');
            $table->char('art_author',10)->default('')->comment('文章作者');
            $table->char('art_intro',100)->default('')->comment('文章描述');
            $table->integer('art_pubtime')->default(0)->comment('文章提交时间');
            $table->integer('art_click')->default(0)->comment('文章点击量');
            $table->tinyInteger('cat_id')->default(0)->comment('文章所属栏目id');
            $table->tinyInteger('art_status')->default(1)->comment('文章当前状态,0为不显示,1为发布');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('arts');
    }
}
